package com.hubei.car.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hubei.car.entity.CompanyProperty;
import com.hubei.car.entity.Result;
import com.hubei.car.mapper.CompanyPropertyMapper;
import com.hubei.car.service.CompanyPropertyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class CompanyPropertyServiceImpl implements CompanyPropertyService{

    @Autowired
    private CompanyPropertyMapper companyPropertyMapper;

    /**
     * 查询公司介绍列表
     * @return
     */
    @Override
    public Result queryOneCompanyProperty() {
        QueryWrapper<CompanyProperty> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("type", 1);
        CompanyProperty companyProperty = companyPropertyMapper.selectOne(queryWrapper);
        return Result.ok(companyProperty);
    }

}
